package Plane;


import java.awt.Graphics;
import java.awt.Image;

public class Explode {

    double x,y;

    static Image[] imgs = new Image[16];
    static {
        for(int i=0;i<16;i++){
            imgs[i] = GameUtil.getImage("images/explode/bz" +(i+1)+".gif");//一定要注意名字与图片一致，否则运行时提示空指针
            imgs[i].getWidth(null);
        }
    }

    int count;

    public void draw(Graphics g){
        if(count<=15){
            g.drawImage(imgs[count], (int)x, (int)y, null);
            count++;
        }
    }

    public Explode(double x,double y){
        this.x = x;
        this.y = y;
    }

    public Explode() {

    }
}